package com.offcn.question.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MybatisPlusPageConfig {

    //声明分页插件对象
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        //设置分页插件属性
        paginationInterceptor.setOverflow(true);
        paginationInterceptor.setLimit(1000L);
        return paginationInterceptor;
    }
}
